import React from 'react'
 import StepLoadTable from '../../component/stepLoadTable_cll1/stepLoadTable_cll1'
 // import './css/StepLoadTableDemo.css' 

 
class StepLoadTableDemo extends React.Component {
    constructor(props) {
        super(props)
        this.state = {}
    }  
    tableDatas = [
        {
          stnm:'3',
          val:'340'  
        },  {
          stnm:'3',
          val:'340'  
        }
     ] 
    info={   
        boxH:600,
        boxW:300, 
    }
 
    componentWillMount = () => {   } 
    componentDidMount = () => {  
             this.refs.StepLoadTable.setTableMassage(this.tableDatas);
    }    
 
    // table配置
    tableConfig = {
        col : [ 
            {type:'text',name:'测站名称',width:0.5,align:'center',key :'stnm'},
            {type:'text',name:'降雨量(mm)',width:0.5,align:'center',key :'val'}, 
        ],//头设置  {type:字段类型 'text' 字符串 'img' 图片,width:宽度 0-1 , key :'listMassage 数据中的key值',textRow : 显示行数}
        titleStyle : {color:'#fff',fontWeight:'normal',backgroundColor: '#618CD0'},
        titleH :32 ,//thead的高度
        listH : 32, //列高
        boxH:400,//table的height
        fontStyle : {fontFamily:'微软雅黑',fontSize:'14px',fontWeight:'400',color:'#323535'},
        tableBorder : false, //table的边框
        stepLoad:false,//全部加载
        // clickCol : 0, //第一栏点击
        // partNumber:9//点击加载一次9条
    } 

    clickItem=(item)=>{ 
        console.log(item); 
    } 
    render() {  
 
        return (
            <div className='StepLoadTableDemo'  > 
                 <StepLoadTable config={this.tableConfig} ref='StepLoadTable'  clickItem={this.clickItem} />
            </div> 
        )
    }
}

export default StepLoadTableDemo
